package cn.sxt.userscenter.head.controller;

import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import cn.sxt.userscenter.common.util.ConstatFinalUtil;
import cn.sxt.userscenter.common.util.PageInfoUtil;
import cn.sxt.userscenter.users.pojo.AAdmins;
import cn.sxt.userscenter.users.service.IUsersService;

/**
 * 不需要登陆的操作
 * @author wangshSxt
 *
 */
@Controller
public class NoLoginController
{
	@Resource
	private IUsersService usersService;
	
	/**
	 * 管理员列表页面
	 * @return
	 */
	@RequestMapping("/adminsList")
	public String adminsList(HttpServletRequest request)
	{
		ConstatFinalUtil.LOGGER.info("---- adminsList ----");

		PageInfoUtil pageInfoUtil = new PageInfoUtil() ; 
		/* 按照id查询 */
		Map<String, Object> condMap = new HashMap<String,Object>();
		List<AAdmins> adminsList = this.usersService.findCondListAdminsService(pageInfoUtil, condMap);
		/* 存储结果 */
		request.setAttribute("adminsList", adminsList);
		request.setAttribute("pageInfoUtil", pageInfoUtil);
		return "/head/adminsList" ; 
	}
	
	
	
}
